Skip to content

Updated DD4TModelBuilder to support arbitrary Multimedia links. This …#16

Open
willprice76 wants to merge 1 commit intomasterfrom
feature/issue-15
Open

Updated DD4TModelBuilder to support arbitrary Multimedia links. This …#16
willprice76 wants to merge 1 commit intomasterfrom
feature/issue-15

Conversation

@willprice76
Copy link
Collaborator

…cleans up the code significantly as we now can use GetMultiComponentLinks for all multimedia links and no longer need: GetMultiMediaLinks, GetYoutubeVideos, GetImages, GetDownloads. Note that there is a new virtual protected method; ProcessType which contains logic to determine a more specific sub type if a model has a generic Media item property. This logic was previously handled in the GetMultiMediaLinks method and is needed for Teaser, and Article.ArticleBody, which have generic Media properties which can contain Image, YouTube or Download. This method can be overridden in your own ModelBuilder if you want to extend the logic.
This fixes issue #15

…cleans up the code significantly as we now can use GetMultiComponentLinks for all multimedia links and no longer need: GetMultiMediaLinks, GetYoutubeVideos, GetImages, GetDownloads. Note that there is a new virtual protected method; ProcessType which contains logic to determine a more specific sub type if a model has a generic Media item property. This logic was previously handled in the GetMultiMediaLinks method and is needed for Teaser, and Article.ArticleBody, which have generic Media properties which can contain Image, YouTube or Download. This method can be overridden in your own ModelBuilder if you want to extend the logic.
@willprice76
Copy link
Collaborator Author

Oh... and this also fixes issue #11 by the way...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant